home *** CD-ROM | disk | FTP | other *** search
- property pMySprite, pMyMember, pMyMember2, pMyMember3, pMyGridNum
- global gSize
-
- on beginSprite me
- pMySprite = sprite(me.spriteNum)
- pMyMember = pMySprite.memberNum
- pMyMember2 = pMyMember - 1
- pMyMember3 = pMyMember + 1
- pMyGridNum = sprite(2).memberNum
- end
-
- on mouseEnter me
- set the memberNum of sprite pMySprite to pMyMember3
- case the currentSpriteNum of
- "42":
- put "Toggle grid visibility. (Space)" into field "status"
- "234":
- put "Launch the PixelToolbox User Guide. (Ctrl+H)" into field "status"
- "238":
- put "Minimize the PixelToolbox window. (Ctrl+M)" into field "status"
- "239":
- put "Close PixelToolbox. (Ctrl+Q)" into field "status"
- "259":
- put "Toggle grid overlay mode between normal and inverted." into field "status"
- "273":
- put "Toggle grid type between normal and perspective." into field "status"
- end case
- end
-
- on mouseLeave me
- set the memberNum of sprite pMySprite to pMyMember
- put EMPTY into field "status"
- end
-
- on mouseDown me
- repeat while the mouseDown
- set the memberNum of sprite pMySprite to pMyMember2
- updateStage()
- end repeat
- end
-
- on mouseUp me
- set the memberNum of sprite pMySprite to pMyMember3
- case the currentSpriteNum of
- "42":
- showHideGrid()
- "234":
- launchGuide()
- "238":
- appMinimize()
- "239":
- quitPixelToolbox()
- "259":
- invertGrid()
- "273":
- perspectiveGrid()
- end case
- end
-
- on showHideGrid
- if sprite(2).blend = 100 then
- sprite(2).blend = 0
- else
- sprite(2).blend = 100
- end if
- end
-
- on invertGrid
- if sprite(2).ink = 36 then
- sprite(2).ink = 2
- else
- sprite(2).ink = 36
- end if
- end
-
- on perspectiveGrid
- if sprite(2).memberNum = pMyGridNum then
- if gSize = "48" then
- sprite(2).memberNum = 462
- else
- sprite(2).memberNum = 461
- end if
- else
- sprite(2).memberNum = pMyGridNum
- end if
- end
-
- on quitPixelToolbox
- if the frame < 30 then
- quit()
- else
- if sprite(1).pUndoTrigger then
- if field("file status") = EMPTY then
- newDocCheck = baMsgBox("Save current project before exiting?", "Save First?", "YesNoCancel", "Question", 3)
- if newDocCheck = "Yes" then
- saveAsColorPattern()
- else
- if newDocCheck = "Cancel" then
- pass()
- end if
- end if
- else
- newDocCheck = baMsgBox("Save changes to current project before exiting?", "Save First?", "YesNoCancel", "Question", 3)
- if newDocCheck = "Yes" then
- saveColorPattern()
- else
- if newDocCheck = "Cancel" then
- pass()
- end if
- end if
- end if
- end if
- repeat with i = 1 to 32
- writeCustomColors = baWriteIni("Custom Colors", "Color" & string(i), line i of field "custom colors", the moviePath & "PixelToolbox.ini")
- if writeCustomColors = 0 then
- alert("Could not save custom colors.")
- exit repeat
- end if
- end repeat
- quit()
- end if
- end
-